/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Eventos;

import InterfaceEI.JanelaPrincipal;
import InterfaceEI.PanelPrincipal;
import Utils.Utilidades;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.text.DecimalFormat;
import javax.swing.JOptionPane;

/**
 *
 * @author Isabela
 */
public class MouseEventosPanel implements MouseListener, MouseMotionListener{

    private PanelPrincipal panelP;
    private boolean fim = false;
    private boolean desenhou = false;
    private Utilidades utili = new Utilidades();

    private JanelaPrincipal frame;


    public void setPanelP(PanelPrincipal panelP) {
        this.panelP = panelP;
    }

    public void setFrame(JanelaPrincipal frame) {
        this.frame = frame;
    }

    public MouseEventosPanel(PanelPrincipal panelP, JanelaPrincipal frame) {
        this.panelP = panelP;
        this.frame = frame;
        
    }


    public void mouseClicked(MouseEvent e) {
       
    }

    public void mousePressed(MouseEvent e) {
    
    }

    public void mouseReleased(MouseEvent e) {
        
    }

    public void mouseEntered(MouseEvent e) {
        
    }

    public void mouseExited(MouseEvent e) {
       
    }

    public void mouseDragged(MouseEvent e) {
       
    }

    public void mouseMoved(MouseEvent e) {
        
//        frame.getTextFieldXpixel().setText(String.valueOf(e.getX()));
//        frame.getTextFieldYpixel().setText(String.valueOf(e.getY()));
//        
//        DecimalFormat df = new DecimalFormat("0.00");
//
//        double x = utili.conversaoPixelMX(e.getX(), panelP.getWidth());
//        frame.getTextFieldXreal().setText(String.valueOf(df.format(x)));
//        
//        
//        double y = utili.conversaoPixelMY(e.getY(), panelP.getHeight());
//        frame.getTextFieldYreal().setText(String.valueOf(df.format(y)));
    }
}
